<?php
echo $_POST['string'];

require_once 'AipNlp.php';

// 你的 APPID AK SK
const APP_ID = '24166630';
const API_KEY = 'BODluebqBkxDIr84RDxgWMZx';
const SECRET_KEY = 'we5ig24Gsc1CwcGt4ZTsV0w8aiChkq8W ';

$client = new AipNlp(APP_ID, API_KEY, SECRET_KEY);

$text =$_POST['string'];

// 调用情感倾向分析
$result = $client->sentimentClassify($text);
var_dump($result);